QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    threeLib/gPublic.cpp \
    threeLib/smallerShare.cpp

HEADERS += \
    mainwindow.h \
    threeLib/gPublic.h \
    threeLib/smallerShare.h

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    smallerQrc.qrc

RC_ICONS = img/icon128.ico


## 加入pro文件,编译后自动复制依赖库进入编译后的目录
contains(CONFIG, static){
    # Static compilation does not require deployment
}else{
    # Windows platform(only for x86 architecture)
    win32 {
        DEPLOY_TOOL = $${dirname(QMAKE_QMAKE)}/windeployqt.exe
        DEPLOY_TOOL = $$replace(DEPLOY_TOOL, /, \\)

        contains(CONFIG, debug, debug|release){
            DEPLOY_TARGET = $${OUT_PWD}/debug/$${TARGET}.exe
        }else{
            DEPLOY_TARGET = $${OUT_PWD}/release/$${TARGET}.exe
        }

        DEPLOY_TARGET=$$replace(DEPLOY_TARGET, /, \\)
        msvc {
            QMAKE_POST_LINK+=$${DEPLOY_TOOL} $${DEPLOY_TARGET} --force --no-translations $$escape_expand(\\n)
        }else{
            QMAKE_POST_LINK+=$${DEPLOY_TOOL} $${DEPLOY_TARGET} --force --no-translations $$escape_expand(\\n\\t)
        }

        CONFIG(debug, debug|release){
            DEPLOY_TARGET_PATH = $$OUT_PWD/debug/
        }
        CONFIG(release, debug|release){
            DEPLOY_TARGET_PATH = $$OUT_PWD/release/
        }
    }
}

RESOURCES += \
    smallerQrc.qrc
